Yet another fix for D103 Garmin's losing short waypoint names. This
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 28 Apr 2004 15:23:25 +0000 (15:23 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 28 Apr 2004 15:23:25 +0000 (15:23 +0000)
one verified on both the GPilotS simulator and by Gary Mumma.

gpsbabel/Makefile
gpsbabel/jeeps/gpsapp.c

index d64a33b4d1bcdcb4620a001e735a567481f6a6b1..ab03d8da01031a203f5ca1b78bcb9b6dac15bb09 100644 (file)
@@ -78,8 +78,8 @@ dep:
        (echo -n "internal_styles.c: mkstyle.sh " ; echo style/*.style ; /bin/echo -e '\t./mkstyle.sh > $@ || (rm -f $@ ; exit 1)' ) >> /tmp/dep
        echo Edit Makefile and bring in /tmp/dep
 
-VERSIONU=1_2_3_beta04202004
-VERSIOND=1.2.3_beta04202004
+VERSIONU=1_2_3_beta04272004
+VERSIOND=1.2.3_beta04272004
 #VERSIONU=1_2_2
 #VERSIOND=1.2.2
 
index 2b71196a0d59f094f6662f9cb9948fccbdec118d..0649a8e4af32b91ff064fa6164f3609198c7818c 100644 (file)
@@ -1640,7 +1640,15 @@ static void GPS_D103_Send(UC *data, GPS_PWay way, int32 *len)
     
     p = data;
 
-    for(i=0;i<6;++i) *p++ = way->ident[i];
+    for(i=0;i<6;++i)  {
+           if (way->ident[i] == 0) {
+                   memset(p, ' ', 6-i);
+                   p+=6-i;
+                   break;
+           }
+           *p++ = way->ident[i];
+    }
+
     GPS_Util_Put_Int(p,(int32)GPS_Math_Deg_To_Semi(way->lat));
     p+=sizeof(int32);
     GPS_Util_Put_Int(p,(int32)GPS_Math_Deg_To_Semi(way->lon));